

import 'package:ysy_flutter_mvvm_yuanxuan/bean/base/BaseBean.dart';

class CartShoppingBean extends BaseJsonBean{
  String? storeId;
  String? storeName;
  bool isCheck=false;
  List<ShoppingCartLists>? shoppingCartLists;

  CartShoppingBean({this.storeId, this.storeName, this.shoppingCartLists});

  CartShoppingBean.fromJson(Map<String, dynamic> json) {
    storeId = json['storeId'];
    storeName = json['storeName'];
    if (json['shoppingCartLists'] != null) {
      shoppingCartLists = [];
      json['shoppingCartLists'].forEach((v) {
        shoppingCartLists?.add(new ShoppingCartLists.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['storeId'] = this.storeId;
    data['storeName'] = this.storeName;
    if (this.shoppingCartLists != null) {
      data['shoppingCartLists'] =
          this.shoppingCartLists?.map((v) => v.toJson()).toList();
    }
    return data;
  }
}

class ShoppingCartLists {
  int? id;
  String? productId;
  int? productSkuId;
  String? memberId;
  int? quantity;
  double? price;
  String? productPic;
  String? productName;
  String? productSkuCode;
  int? productCategoryId;
  String? productAttr;
  String? productType;
  int? productStock;
  int? isAskPriceFlag;
  String? unit;
  String? askPrice;
  bool isCheck=false;

  ShoppingCartLists(
      {this.id,
        this.productId,
        this.productSkuId,
        this.memberId,
        this.quantity,
        this.price,
        this.productPic,
        this.productName,
        this.productSkuCode,
        this.productCategoryId,
        this.productAttr,
        this.productType,
        this.productStock,
        this.isAskPriceFlag,
        this.unit,
        this.askPrice});

  ShoppingCartLists.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    productId = json['productId'];
    productSkuId = json['productSkuId'];
    memberId = json['memberId'];
    quantity = json['quantity'];
    price = json['price'];
    productPic = json['productPic'];
    productName = json['productName'];
    productSkuCode = json['productSkuCode'];
    productCategoryId = json['productCategoryId'];
    productAttr = json['productAttr'];
    productType = json['productType'];
    productStock = json['productStock'];
    isAskPriceFlag = json['isAskPriceFlag'];
    unit = json['unit'];
    askPrice = json['askPrice'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['productId'] = this.productId;
    data['productSkuId'] = this.productSkuId;
    data['memberId'] = this.memberId;
    data['quantity'] = this.quantity;
    data['price'] = this.price;
    data['productPic'] = this.productPic;
    data['productName'] = this.productName;
    data['productSkuCode'] = this.productSkuCode;
    data['productCategoryId'] = this.productCategoryId;
    data['productAttr'] = this.productAttr;
    data['productType'] = this.productType;
    data['productStock'] = this.productStock;
    data['isAskPriceFlag'] = this.isAskPriceFlag;
    data['unit'] = this.unit;
    data['askPrice'] = this.askPrice;
    return data;
  }
}
